package lumis.service.pagepersonalization.doui.control;

import lumis.doui.control.script.ScriptControl;
import lumis.portal.PortalException;

import java.io.IOException;

/**
 * Script Control that include the JQuery library.
 *
 * @version $Revision: 13321 $ $Date: 2011-08-08 11:32:13 -0300 (Mon, 08 Aug 2011) $
 * @since 6.0.0
 */
public class PagePersonalizationJQueryScriptControl extends ScriptControl
{
	@Override
	public void setRenderData() throws PortalException
	{
		String scriptNodeText = "<script type=\"text/javascript\" src=\"lumis/service/pagepersonalization/script/jquery.js\"></script> ";
		try
		{
			douiContext.getRenderResponse().getBeforeWriter().print(scriptNodeText,"JQuery");
		}
		catch (IOException e)
		{
			new PortalException(e.getMessage(), e);
		}
	}
}
